﻿<UserControl x:Class="SmartRoute.View.CoordinatesEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="73" Width="215">
    <Grid Height="70" Width="210">
        <TextBox Height="23" Margin="12,10,78,0" Name="LatitudeText" VerticalAlignment="Top"  TextChanged="LatitudeText_TextChanged" >
            <TextBox.Text>
                <Binding Path="Latitude" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay"></Binding>
            </TextBox.Text>
        </TextBox>
        <TextBox Height="23" Margin="12,0,78,8" Name="LongitudeText" VerticalAlignment="Bottom" ToolTip="The Longitude">
            <TextBox.Text>
                <Binding>
                    <Binding.Path>Longitude</Binding.Path>
                    <Binding.ValidationRules>
                        <ExceptionValidationRule/>
                    </Binding.ValidationRules>
                    <Binding.Mode>TwoWay</Binding.Mode>
                    <Binding.UpdateSourceTrigger>PropertyChanged</Binding.UpdateSourceTrigger>
                    <!-- P="Longitude" UpdateSourceTrigger="PropertyChanged" Mode="TwoWay"-->
                </Binding>
            </TextBox.Text>
        </TextBox>
        <Label HorizontalAlignment="Right" Margin="0,8,12,34" Name="label1" Width="60">Latitude</Label>
        <Label HorizontalAlignment="Right" Margin="0,34,12,8" Name="label2" Width="60">Longitude</Label>
    </Grid>
</UserControl>
